import React, { useEffect, useRef } from 'react';

export default function AutoFocus() {
  const refInput = useRef<any>();
  useEffect(() => {
    refInput.current.focus();
  }, []);
  return (
    <div>
      <input ref={refInput} defaultValue="hello refs"/>
    </div>
  );
}
